import { INIT_FOOTER_BAR_LIST, CHANGE_FOOTER_BAR_SELECTED_INDEX } from "@/constants/footerBar";

const INIT_DATA = {
    footerBarMenuList: [],
    currentSelectedIndex: 0
}

export default function footerBar(state = INIT_DATA, action) {
    switch(action.type) {
        case INIT_FOOTER_BAR_LIST:
            return {
                ...state,
                footerBarMenuList: action.payload  
            }
        case CHANGE_FOOTER_BAR_SELECTED_INDEX:
            return {
                ...state,
                currentSelectedIndex: action.payload
            }
        default:
            return state;
    }
}
